﻿using Janus.BaseEntitys;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Janus.BaseEntitys
{
    public class GlobaEnum
    {
        public enum ModuleTypes
        {
            模块 = 0,
            按钮 = 1,
            选项卡 = 2,
            功能点 = 3
        }

        #region SO
        //[ShowName("SO")]
        public enum SOMain
        {
            [ShowName("暂存", "")]
            Temporary = 0,
            [ShowName("已审核", "")]
            Audited = 1,
            [ShowName("已上传", "")]
            Released = 2,
            [ShowName("已发货", "")]
            Shipped = 3,
            [ShowName("已收货", "")]
            Received = 4,
            [ShowName("已结案", "")]
            Cased = 5
            //,
            //[ShowName("已结算", "")]
            //Payed = 6
        }

        //[ShowName("销售订单")]
        public enum SO
        {
            [ShowName("暂存", "销售订单")]
            Temporary = 0,
            [ShowName("已审核", "销售订单")]
            Audited = 100,
            [ShowName("已上传", "销售订单")]
            Released = 200,
            [ShowName("已确认", "销售订单")]
            Confirmed = 250
        }

        //[ShowName("生产计划单")]
        public enum SOWorkPlan
        {
            [ShowName("暂存", "生产计划单")]
            Temporary = 201,
            [ShowName("已审核", "生产计划单")]
            Audited = 210,
        }

        //[ShowName("生产领料单")]
        public enum SOWorkPicking
        {
            [ShowName("暂存", "生产领料单")]
            Temporary = 230,
            [ShowName("已审核", "生产领料单")]
            Audited = 240,
        }

        //[ShowName("完工入库单")]
        public enum SOWorkOrder
        {
            [ShowName("暂存", "完工入库单")]
            Temporary = 250,
            [ShowName("已审核", "完工入库单")]
            Audited = 260,
        }

        //[ShowName("销售出货")]
        public enum SOShipOrder
        {
            [ShowName("暂存", "销售出货")]
            Temporary = 280,
            [ShowName("已审核", "销售出货")]
            Audited = 290,
            [ShowName("已出库", "销售出货")]
            已出库 = 300,
            [ShowName("已装柜或车", "销售出货")]
            已装柜或车 = 310,
            [ShowName("货已离场", "销售出货")]
            货已离场 = 330

        }

        //[ShowName("收货单")]
        public enum SOReceivingOrder
        {
            [ShowName("暂存", "收货单")]
            Temporary = 390,
            [ShowName("已审核", "收货单")]
            Audited = 400,

        }

        //[ShowName("装箱单发票")]
        public enum SOPackingList
        {
            [ShowName("暂存", "装箱单发票")]
            Temporary = 401,
            [ShowName("已审核", "装箱单发票")]
            Audited = 410,

        }
        #endregion

        #region PO
        //[ShowName("PO")]
        public enum POMain
        {
            [ShowName("暂存", "")]
            Temporary = 0,
            [ShowName("已审核", "")]
            Audited = 1,
            [ShowName("已上传", "")]
            Released = 2,
            [ShowName("已发货", "")]
            Shipped = 3,
            [ShowName("已收货", "")]
            Received = 4,
            [ShowName("已结案", "")]
            Cased = 5
            //,
            //[ShowName("已结算", "")]
            //Payed = 6
        }

        //[ShowName("原始采购订单")]
        public enum ERPPO
        {
            [ShowName("暂存", "原始采购订单")]
            Temporary = 10,
            [ShowName("审核", "原始采购订单")]
            Audited = 30,
            [ShowName("拆分中", "原始采购订单")]
            InSplit = 40,
            [ShowName("已拆分", "原始采购订单")]
            AfterSplit = 41,
            [ShowName("上传EBS", "原始采购订单")]
            UploadEBS = 100
        }

        //[ShowName("企业采购订单")]
        public enum CCSPO
        {
            [ShowName("暂存", "企业采购订单")]
            Temporary = 10,
            [ShowName("关务确认", "企业采购订单")]
            Audited = 130,
            [ShowName("关务已拆分", "企业采购订单")]
            AfterSplit = 140
        }

        //[ShowName("发货单")]
        public enum POShipOrder
        {
            [ShowName("暂存", "发货单")]
            Temporary = 290,
            [ShowName("已审核", "发货单")]
            Audited = 300,
        }

        //[ShowName("收货单")]
        public enum POReceiving
        {
            [ShowName("暂存", "收货单")]
            Temporary = 301,
            [ShowName("已审核", "收货单")]
            Audited = 400,

        }

        //[ShowName("装箱单发票")]
        public enum POPackingList
        {
            [ShowName("暂存", "装箱单发票")]
            Temporary = 401,
            [ShowName("已审核", "装箱单发票")]
            Audited = 410,

        }
        #endregion

        #region Service
        //[ShowName("服务委托")]
        public enum ServiceMain
        {
            [ShowName("暂存", "")]
            Temporary = 0,
            [ShowName("已上传", "")]
            Audited = 1,
            [ShowName("接受委托", "")]
            Accepted = 2,
            [ShowName("处理中", "")]
            Processed = 3,
            [ShowName("结束", "")]
            Closed = 8
            //,
            //[ShowName("费用结算", "")]
            //Payed = 10

        }

        /// <summary>
        /// 货代->进口业务-> 
        /// </summary>
        #region 货代->进口业务
        //[ShowName("订舱委托")]
        public enum ImBooking
        {
            [ShowName("暂存", "订舱")]
            Temporary = 0,
            [ShowName("接受委托", "订舱")]
            Accepted = 200,
            [ShowName("审核", "订舱")]
            Audited = 300,
            [ShowName("订舱完成", "订舱")]
            Booked = 305
        }


        //[ShowName("到货通知")]
        public enum ImArrivalNotice
        {
            [ShowName("暂存", "到货通知")]
            Temporary = 310,
            [ShowName("已审核", "到货通知")]
            Audited = 315,
            [ShowName("下载补料提单", "到货通知")]
            DownloadedBL = 320,
            [ShowName("接收提单", "到货通知")]
            ReceivedBL = 325,
            [ShowName("换单完成", "到货通知")]
            ChangeBL = 330,
            [ShowName("发放提单", "到货通知")]
            ReleaseBL = 335
        }

        //[ShowName("大船提单")]
        public enum ImBL
        {
            [ShowName("暂存", "提单")]
            Temporary = 0,
            [ShowName("已审核", "提单")]
            Audited = 700,
            [ShowName("下载补料提单", "提单")]
            DownloadedBL = 710,
            [ShowName("接收提单", "提单")]
            ReceivedBL = 720,
            [ShowName("换单完成", "提单")]
            ChangeBL = 730,
            [ShowName("发放提单", "提单")]
            ReleaseBL = 740
        }

        //[ShowName("补料通知")]
        public enum ImSupFood
        {
            [ShowName("暂存", "补料通知")]
            Temporary = 0,
            [ShowName("审核", "补料通知")]
            Audited = 329,
            [ShowName("下补料通知", "补料通知")]
            DownloadedNotes = 330,
            [ShowName("下载补料提单", "补料通知")]
            DownloadedBL = 335,
            [ShowName("发放提单", "补料通知")]
            ReleaseBL = 339
        }
        #endregion

        #region 货代出口
        public enum ExBooking
        {
            [ShowName("暂存", "订舱")]
            Temporary = 0,
            [ShowName("接受委托", "订舱")]
            Accepted = 200,
            [ShowName("审核", "订舱")]
            Audited = 345,
            [ShowName("订舱完成", "订舱")]
            Booked = 346
        }

        /// <summary>
        /// 订舱确认单
        /// </summary>
        public enum ExConfBooking
        {
            [ShowName("暂存", "订舱确认单")]
            Temporary = 347,
            [ShowName("订舱完成", "订舱确认单")]
            Booked = 348
        }

        //[ShowName("大船提单")]
        public enum ExBL
        {
            [ShowName("暂存", "提单")]
            Temporary = 0,
            [ShowName("已审核", "提单")]
            Audited = 760,
            [ShowName("接收补料", "提单")]
            ReceivedFood = 770,
            [ShowName("上传船公司", "提单")]
            Uploaded = 780,
            [ShowName("接收提单", "提单")]
            ReceivedBL = 790,
            [ShowName("发放提单", "提单")]
            ReleaseBL = 799
        }

        //[ShowName("补料通知")]
        public enum ExSupFood
        {
            [ShowName("暂存", "补料通知")]
            Temporary = 0,
            [ShowName("接受委托", "补料通知")]
            Accepted = 200,
            [ShowName("审核", "补料通知")]
            Audited = 351,
            [ShowName("下补料通知", "补料通知")]
            DownloadedNotes = 355,
            [ShowName("接收补料", "补料通知")]
            ReceivedFood = 360,
            [ShowName("上传船公司", "补料通知")]
            Uploaded = 365,
            [ShowName("接收提单", "补料通知")]
            ReceivedBL = 370,
            [ShowName("发放提单", "补料通知")]
            ReleaseBL = 375
        }
        #endregion

        #region 报检
        //[ShowName("报检")]
        public enum Inspection
        {
            [ShowName("接受委托", "报检")]
            Accepted = 200,
            [ShowName("审核", "报检")]
            Audited = 401,
            [ShowName("资料已收齐", "报检")]
            Collected = 410,
            [ShowName("递单申报", "报检")]
            Declared = 420,
            [ShowName("通关单已出单", "报检")]
            Issued = 430,
            [ShowName("领取换证凭条/单", "报检")]
            ReceivedSlip = 440,
            [ShowName("换取通关单", "报检")]
            Exchanged = 450
        }
        #endregion

        #region 报关
        //[ShowName("报关")]
        public enum Customs
        {
            [ShowName("暂存", "报关")]
            CustomsTemporary = 0,
            [ShowName("接受委托", "报关")]
            Accepted = 200,
            [ShowName("资料已收齐", "报关")]
            Collected = 510,
            [ShowName("申报", "报关")]
            Declared = 540,
            [ShowName("审核通过", "报关")]
            AuditedPass = 550,
            [ShowName("通知缴税", "报关")]
            Rating = 560,
            [ShowName("缴税完成", "报关")]
            Rated = 570,
            [ShowName("报关单放行", "报关")]
            Passeds = 580
        }
        #endregion

        #region 运输进厂
        //[ShowName("国内运输")]
        public enum ImTransportation
        {
            [ShowName("接受委托", "国内运输")]
            Accepted = 200,
            [ShowName("暂存", "国内运输")]
            Temporary = 600,
            [ShowName("审核", "国内运输")]
            Audited = 601,
            [ShowName("换单放柜", "国内运输")]
            Exchanged = 605,
            [ShowName("进场提柜", "国内运输")]
            Pickuping = 610,
            [ShowName("提柜离场", "国内运输")]
            Pickuped = 615,
            [ShowName("离场运输", "国内运输")]
            Transporting = 620,
            [ShowName("到仓卸货", "国内运输")]
            Unloading = 625,
            [ShowName("卸货放行", "国内运输")]
            UnloadPassed = 630,
            [ShowName("返吉放行", "国内运输")]
            Returned = 635,
            [ShowName("费用结案", "国内运输")]
            Payed = 640
        }
        #endregion

        #region 运输出厂
        //[ShowName("国内运输")]
        public enum ExTransportation
        {
            [ShowName("接受委托", "国内运输")]
            Accepted = 200,
            [ShowName("暂存", "国内运输")]
            Temporary = 645,
            [ShowName("审核", "国内运输")]
            Audited = 646,
            [ShowName("打单提柜", "国内运输")]
            Pickuping = 650,
            [ShowName("提柜离场", "国内运输")]
            Pickuped = 655,
            [ShowName("进厂提货", "国内运输")]
            PickupingGoods = 660,
            [ShowName("离厂运输", "国内运输")]
            Transporting = 665,
            [ShowName("交还重柜", "国内运输")]
            ReturnedHtank = 670
        }
        #endregion

        #endregion

        #region 企业物料备案
        //[ShowName("企业物料备案")]
        public enum PtsEntHead
        {
            [ShowName("草稿", "企业物料备案")]
            Temporary = 0,
            [ShowName("草稿提交", "企业物料备案")]
            TemporaryCommit = 10,
            [ShowName("内部审核", "企业物料备案")]
            AuditedInter = 20,
            [ShowName("审核", "企业物料备案")]
            Audited = 30,
            [ShowName("完成", "企业物料备案")]
            Finished = 40,
            [ShowName("海关审核", "企业物料备案")]
            CusAudited = 50,
        }
        #endregion

        #region 转厂
        public enum TFOut
        {
            [ShowName("暂存", "发货单")]
            Temporary = 0,
            [ShowName("已修正", "发货单")]
            Amendmented = 1,
            [ShowName("已审核", "发货单")]
            Audited = 10,
            [ShowName("已上传", "发货单")]
            Released = 20,
            [ShowName("已申报", "发货单")]
            Declared = 30,
            [ShowName("已录入QP库", "发货单")]
            ReacordedQP = 40,
            [ShowName("返回QP信息", "发货单")]
            ReturnQP = 50,
            [ShowName("已生成报关单", "发货单")]
            Cased = 60
        }
        public enum TFIn
        {
            [ShowName("暂存", "发货单")]
            Temporary = 0,
            [ShowName("已修正", "发货单")]
            Amendmented = 1,
            [ShowName("已审核", "发货单")]
            Audited = 10,
            [ShowName("已上传", "发货单")]
            Released = 20,
            [ShowName("已申报", "发货单")]
            Declared = 30,
            [ShowName("已录入QP库", "发货单")]
            ReacordedQP = 40,
            [ShowName("返回QP信息", "发货单")]
            ReturnQP = 50,
            [ShowName("已生成报关单", "发货单")]
            Cased = 60
        }
        public enum TFApp
        {
            [ShowName("暂存", "关封")]
            Temporary = 0,
            [ShowName("已上传", "关封")]
            Audited = 1,
            [ShowName("已申报", "关封")]
            Declared = 2,
            [ShowName("已录入QP库", "关封")]
            Cased = 3

        }


        #endregion

        #region 规则验证类型
        public enum VerifyType : int
        {
            /// <summary>
            /// 无操作
            /// </summary>
            [ShowName("无操作", "")]
            None = 0,
            /// <summary>
            /// 导入验证
            /// </summary>
            [ShowName("导入验证", "")]
            ImportVer = 1,
            /// <summary>
            /// 即时验证
            /// </summary>
            [ShowName("即时验证", "")]
            ImmedVer = 2,
            /// <summary>
            /// 保存验证
            /// </summary>
            [ShowName("保存验证", "")]
            SaveVer = 3,
            /// <summary>
            /// 发送前验证
            /// </summary>
            [ShowName("发送前验证", "")]
            SendVer = 4,
            /// <summary>
            /// 审核验证
            /// </summary>
            [ShowName("审核验证", "")]
            AuditVer = 5,
            /// <summary>
            /// 删除验证
            /// </summary>
            [ShowName("删除验证", "")]
            DeleteVer = 6,
            /// <summary>
            /// 停用验证
            /// </summary>
            [ShowName("停用验证", "")]
            DisableVer = 7,
            /// <summary>
            /// 启用验证
            /// </summary>
            [ShowName("启用验证", "")]
            EnabledVer = 8,
            /// <summary>
            /// 弃审验证
            /// </summary>
            [ShowName("弃审验证", "")]
            NoAuditVer = 9,
            /// <summary>
            /// 新增保存验证
            /// </summary>
            [ShowName("新增保存验证", "")]
            AddSaveVer = 10,
            /// <summary>
            /// 修改保存验证
            /// </summary>
            [ShowName("修改保存验证", "")]
            EditSaveVer = 11
        }
        #endregion

    }

    // public static class GlobaEnumExtensions
    //{              
    //public static string ToAction(this Enum enumeration)
    //{
    //    ShowNameAttribute t = System.Attribute.GetCustomAttribute(enumeration.GetType(), typeof(ShowNameAttribute), false) as ShowNameAttribute;
    //    string result = null;
    //    if (t != null)
    //    {
    //        result = t.ToString();
    //    }
    //    return result;
    //}
    // }
}
